<p-messages [value]="msgs" [closable]="false"></p-messages>
<p-confirmPopup></p-confirmPopup>
<div class="card">
  <h5>Single Column</h5>
  <p-table [value]="borrowLists">
    <ng-template pTemplate="header">
      <tr>
        <th pSortableColumn="code">Id
          <p-sortIcon field="code"></p-sortIcon>
        </th>
        <th pSortableColumn="name">BookId
          <p-sortIcon field="name"></p-sortIcon>
        </th>
        <th pSortableColumn="category">BookName
          <p-sortIcon field="category"></p-sortIcon>
        </th>
        <th pSortableColumn="price">Action
          <p-sortIcon field="price"></p-sortIcon>
        </th>
      </tr>
    </ng-template>
    <ng-template pTemplate="body" let-borrowList>
      <tr>
        <td>{{borrowList.borrowId}}</td>
        <td>{{borrowList.bookId}}</td>
        <td>{{borrowList.bookName}}</td>
        <td>
          <button pButton type="button" class="mr-1" (click)="delete(borrowList.borrowId,$event)">还书</button>
        </td>
      </tr>
    </ng-template>
  </p-table>

</div>

